const DATA2 = require("../test/210223_inzone-gaoshou-2.json");
const lodash = require("lodash");

let zongti = DATA2.filter(e => !e.is_gaoshou);
let logs = []
for (let i = 0; i <= 3; i++) {
  let filter_juli = (dis) => (dis <= (i + 1) * 25000) && (dis > i * 25000);
  if (i === 3) {
    filter_juli = (dis) => (dis > i * 25000);
  }
  let filed = zongti.filter(e => filter_juli(e.distance_to_others));
  let qianwu = filed.filter(e => e.ranking <= 5);
  let chiji = filed.filter(e => e.ranking == 1);
  logs.push({
    "dianshuliang": `${filed.length}个（${lodash.round(filed.length / zongti.length * 100, 2)}%）`,
    "qianwu": `${qianwu.length}个（${lodash.round(qianwu.length / filed.length * 100, 2)}%）`,
    "chiji": `${chiji.length}个（${lodash.round(chiji.length / filed.length * 100, 2)}%）`,
  })
  // debugger
}
console.log('该范围内点的数量 |',logs.map(e=>e.dianshuliang).join("|"))
console.log('该范围内队伍获得前五落点       |',logs.map(e=>e.qianwu).join("|"))
console.log('该范围内队伍吃鸡落点       |',logs.map(e=>e.chiji).join("|"))
debugger